local jw_shenpan = fk.CreateSkill {
    name = "jw_shenpan",
}

Fk:loadTranslationTable {
    ["jw_shenpan"] = "审判",
    [":jw_shenpan"] = "出牌阶段限一次，你可以选择一名“异教”，弃置体力值等量的“狂信”，令其本回合技能失效且无法响应你使用的牌。",

    ["#jw_shenpan"] = "审判：令一名角色技能失效且不能响应你的牌！",

    ["@@jw_shenpan-turn"] = "已老实",
}
jw_shenpan:addEffect("active", {
    anim_type = "offensive",
    prompt = "#jw_shenpan",
    card_num = 0,
    target_num = 1,
    can_use = function(self, player)
        return player:usedSkillTimes(jw_shenpan.name, Player.HistoryPhase) == 0 and 
            player:getMark("@jw_kuang") >= player.hp --需要判定标记数是否不小于血量，回合内发动次数
    end,
    card_filter = Util.FalseFunc,
    target_filter = function(self, player, to_select, selected)
        return #selected == 0 and to_select ~= player and
            to_select:getMark("@@jw_yijiao") > 0  --筛选的目标中，须有异教标记
    end,
    on_use = function(self, room, effect)
        local target = effect.tos[1]
        room:setPlayerMark(target, "@@jw_shenpan-turn", effect.from.id)
        room:removePlayerMark(effect.from, "@jw_kuang", effect.from.hp) --移去玩家血量等量的标记
    end,
})
jw_shenpan:addEffect(fk.CardUsing, {
    is_delay_effect = true,
    can_trigger = function(self, event, target, player, data)
        return target == player and data.card and data.card.type ~= Card.TypeBasic and
            #table.filter(Fk:currentRoom().alive_players, function(p)
                return p:getMark("@@jw_shenpan-turn") ~= 0
            end) > 0 --该标记不属于数量类标记，所以不能用大于小于号，只能等于或不等于
    end,
    on_cost = Util.TrueFunc,
    on_use = function(self, event, target, player, data)
        local room = player.room
        for _, id in ipairs(room:getOtherPlayers(player)) do  --遍历除玩家外的其他角色，符合条件的角色添加如不可响应列表内
            data.disresponsiveList = data.disresponsiveList or {}
            if id:getMark("@@jw_shenpan-turn") == player.id then
                table.insertIfNeed(data.disresponsiveList, id)
            end
        end
    end,
})
jw_shenpan:addEffect("invalidity", {
  invalidity_func = function(self, from, skill)
    return from:getMark("@@jw_shenpan-turn") ~=  0 and skill:isPlayerSkill(from)  --技能失效，没什么好讲的
  end,
})
return jw_shenpan
